{namespace em=TYPO3\CMS\Extensionmanager\ViewHelpers}
<f:layout name="main" />
<f:section name="content">

    <h1><f:translate key="getExtensions">Get Extensions</f:translate></h1>
    <f:render partial="List/UploadForm" />
    <div class="row">
        <div class="col-sm-6">
            <f:form class="typo3-extensionmanager-searchTerForm form-inline" action="ter">
                <div class="input-group">
                    <f:form.textfield name="search" value="{search}" class="form-control" />
                    <span class="input-group-btn">
                        <f:form.submit class="btn btn-default" value="{f:translate(key:'searchTemplate.submitButton')}"/>
                    </span>
                </div>
            </f:form>
        </div>
        <div class="col-sm-6">
            <div class="pull-right">
                <f:render partial="List/UpdateFromTer" />
            </div>
        </div>
    </div>
    <div id="terTableWrapper">
        <f:if condition="{search}">
            <f:then>
                <f:render partial="List/TerTable" arguments="{tableId: 'terSearchTable', extensions:extensions, availableAndInstalled:availableAndInstalled}" />
            </f:then>
            <f:else>
                <f:be.widget.paginate objects="{extensions}" as="extensions" configuration="{itemsPerPage: 10, maximumNumberOfLinks: 2}">
                    <f:render partial="List/TerTable.html" arguments="{tableId: 'terTable', extensions:extensions, availableAndInstalled:availableAndInstalled}" />
                </f:be.widget.paginate>
            </f:else>
        </f:if>
        <div class="splash-receivedata"><core:icon identifier="spinner-circle-dark" /> <f:translate key="extensionList.updateFromTer.label"/></div>
    </div>

</f:section>
